<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/common/meta.jsp"%>
<title>登录页</title>
<script type="text/javascript">
	$(function() {
		function valProjectInput() {
			$("#account").focus();
			$("#loginForm")
					.validate(
							{
								rules : {
									"account" : {
										required : true
									},
									"password" : {
										required : true
									}
								},
								messages : {

								},
								submitHandler : function(form) {
									var options = {
										success : showResponse,
										type : "post",
										resetForm : false,
										contentType : "application/x-www-form-urlencoded; charset=utf-8"
									};
									$("#loginForm").ajaxSubmit(options);
									function showResponse(data) {
										if (data == "ok") {
											showOk(null);
											tabbar.removeTab("tab2");
											flashTable(tbl,
													"${SITE_DYN_TUDOU}/project/list.html");
											tabbar.setTabActive("list");
										} else if (data == "error") {
											showError(null);
										} else {
											showError(data);
										}
										$(document).unbind("ajaxStart");
									}
									return false;

								}

							});
		}
	});
</script>
</head>
<body>
	<sf:form action="${ctx }/login.html" id="loginForm" method="post" modelAttribute="user">
		<table width="932" border="0" cellpadding="0" cellspacing="0"
			align="center" style="border: 15px solid #ffffff; margin-top: 50px;">
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td height="319" align="center">
								<table border="0" cellspacing="0" cellpadding="5">
									<tr>
										<td class="login-little-g">Username</td>
										<td><sf:input path="account" id="account" size="20"
												maxlength="50" /></td>
									</tr>
									<tr>
										<td class="login-little-g">Password</td>
										<td><sf:password path="password" id="password" size="20"
												maxlength="50" /></td>
									</tr>
									<tr>
										<td height="80" colspan="2" align="center"><input
											type="submit" name="submit" value="Login" /></td>
									</tr>

								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</sf:form>
</body>
</html>